#ifndef MFCE_ENGINE_BOARD_INCLUDED
#define MFCE_ENGINE_BOARD_INCLUDED

#include <mfce/engine/bitboard.hpp>
#include <mfce/engine/color.hpp>
#include <mfce/engine/piece.hpp>

namespace mfce
{
namespace engine
{

class board
{
public:

    board()
    : pieces{}
    {
    }

    bitboard pawns(color c) const
    {
        return pieces[static_cast<int>(c)][static_cast<int>(piece::pawn)];
    }

    bitboard knights(color c) const
    {
        return pieces[static_cast<int>(c)][static_cast<int>(piece::knight)];
    }

    bitboard bishops(color c) const
    {
        return pieces[static_cast<int>(c)][static_cast<int>(piece::bishop)];
    }

    bitboard rooks(color c) const
    {
        return pieces[static_cast<int>(c)][static_cast<int>(piece::rook)];
    }

    bitboard queens(color c) const
    {
        return pieces[static_cast<int>(c)][static_cast<int>(piece::queen)];
    }

    bitboard king(color c) const
    {
        return pieces[static_cast<int>(c)][static_cast<int>(piece::king)];
    }

    bitboard all(color c) const
    {
        return pieces[static_cast<int>(c)][static_cast<int>(piece::none)];
    }

private:

    bitboard pieces[2][7];

};

} // close engine namespace
} // close mfce namespace

#endif // include guard

